package com.hlkj.pay.app.merchant.ext.impl.helipay.dto.res;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import java.io.Serializable;
import java.util.Objects;

@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class DelayedSplitCommonRes<T> implements Serializable {

    private String code;

    private String message;

    private String signType;

    private String sign;

    private String data;


    public static boolean isSuccess(String code) {
        return Objects.equals(code, "0000");
    }

    @JsonIgnore // 避免 jackson 序列化
    public boolean isSuccess() {
        return isSuccess(code);
    }

}
